package com.example.demo.controller;

import com.example.demo.entity.Source;
import com.example.demo.mapper.GpaMapper;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/getGpa")
@CrossOrigin
public class GpaController {

    @Resource
    GpaMapper gpaMapper;

    @GetMapping("/getDashujuGpa")
    public List<Source> getDashujuGpa() {
        List<Source> sourceList = gpaMapper.getDashujuGpa();
        return sourceList;
    }

    @GetMapping("/getJisuanjiyingyongGpa")
    public List<Source> getJisuanjiyingyongGpa() {
        List<Source> sourceList = gpaMapper.getJisuanjiyingyongGpa();
        return sourceList;
    }

    @GetMapping("/getRuanjiangongchengGpa")
    public List<Source> getRuanjiangongchengGpa() {
        List<Source> sourceList = gpaMapper.getRuanjiangongchengGpa();
        return sourceList;
    }

    @GetMapping("/getRuanjianjishuGpa")
    public List<Source> getRuanjianjishuGpa() {
        List<Source> sourceList = gpaMapper.getRuanjianjishuGpa();
        return sourceList;
    }
    @GetMapping("/getWangluogongchengGpa")
    public List<Source> getWangluogongchengGpa() {
        List<Source> sourceList = gpaMapper.getWangluogongchengGpa();
        return sourceList;
    }

    @GetMapping("/getWangluojishuGpa")
    public List<Source> getWangluojishuGpa() {
        List<Source> sourceList = gpaMapper.getWangluojishuGpa();
        return sourceList;
    }

    @GetMapping("/getWulianwangGpa")
    public List<Source> getWulianwangGpa() {
        List<Source> sourceList = gpaMapper.getWulianwangGpa();
        return sourceList;
    }

    @GetMapping("/getXinxiguanliGpa")
    public List<Source> getXinxiguanliGpa() {
        List<Source> sourceList = gpaMapper.getXinxiguanliGpa();
        return sourceList;
    }
}
